package com.db.williamchart.data.configuration;

import com.db.williamchart.data.AxisType;
import com.db.williamchart.data.Paddings;
import com.db.williamchart.data.Scale;

import org.jetbrains.annotations.NotNull;

public class BarChartConfiguration extends ChartConfiguration {

    private int barsBackgroundColor;
    private float barsSpacing;
    private float fLabelsFormatter;

    public BarChartConfiguration(int width,
                                 int height,
                                 @NotNull Paddings paddings,
                                 @NotNull AxisType axis,
                                 float labelsSize,
                                 @NotNull Scale scale,
                                 @NotNull float labelsFormatter,
                                 int barsBackgroundColor,
                                 float barsSpacing) {
        super(width, height, paddings, axis, labelsSize, scale, String.valueOf(labelsFormatter));
        this.barsBackgroundColor = barsBackgroundColor;
        this.barsSpacing = barsSpacing;
        this.fLabelsFormatter = labelsFormatter;
    }

    public BarChartConfiguration copy(@NotNull Scale scale) {
        return new BarChartConfiguration(getWidth(),
                getHeight(),
                getPaddings(),
                getAxis(),
                getLabelsSize(),
                scale,
                fLabelsFormatter,
                barsBackgroundColor,
                barsSpacing);
    }

    public int getBarsBackgroundColor() {
        return barsBackgroundColor;
    }

    public float getBarsSpacing() {
        return barsSpacing;
    }

}
